<!--

    Copyright (C) 2015 The Gravitee team (http://gravitee.io)

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

            http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<mat-card class="deployment-configuration">
  <mat-card-content>
    <div class="deployment-configuration__header">
      <div class="deployment-configuration__header__title">Deployment configuration</div>
      <div class="deployment-configuration__header__subtitle">Control where your API is deployed</div>
    </div>

    <div class="deployment-configuration__content">
      <form *ngIf="deploymentsForm" [formGroup]="deploymentsForm" autocomplete="off">
        <div>
          <div class="deployment-configuration__form-field__label">Sharding tags</div>
          <div class="deployment-configuration__form-field__description">
            Choose the sharding tag that you want to assign to the API. This will dictate where it is deployed. Sharding tags are configured
            at the Organization level.
          </div>
          <mat-form-field class="deployment-configuration__form-field">
            <mat-label>Sharding tags</mat-label>
            <mat-select formControlName="tags" multiple>
              <mat-option *ngFor="let tag of shardingTags" [value]="tag.id"
                >{{ tag.name }}<span *ngIf="tag.description"> - {{ tag.description }}</span></mat-option
              >
            </mat-select>
          </mat-form-field>
        </div>
      </form>
    </div>
  </mat-card-content>
</mat-card>
<gio-save-bar [form]="deploymentsForm" [formInitialValues]="initialDeploymentsFormValue" (submitted)="onSubmit()"></gio-save-bar>
